<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="../swfupload.js"></script>
<script type="text/javascript" src="../swfupload.queue.js"></script>
<script type="text/javascript" src="../swfupload.speed.js"></script>
<script type="text/javascript" src="handlers.js"></script>
<script type="text/javascript">
	var swfu;

	window.onload = function() {
		var settings = {
			flash_url : "../swfupload.swf",
			upload_url : "../../../file/uploadFile",
			post_params : {
				"PHPSESSID" : "<?php echo session_id(); ?>"
			},
			file_size_limit : "1 MB",
			file_types : "*.*",
			file_types_description : "所有类型文件",
			file_upload_limit : 100,
			file_queue_limit : 0,
			custom_settings : {
				progressTarget : "fsUploadProgress",
				cancelButtonId : "btnCancel"
			},
			debug : true,

			// Button settings
			button_image_url : "images/TestImageNoText_65x29.png",
			button_width : "65",
			button_height : "29",
			button_placeholder_id : "uploadAll",
			button_text : '<span class="theFont">添加</span>',
			button_text_style : ".theFont { font-size: 16; }",
			button_text_left_padding : 12,
			button_text_top_padding : 3,

			// The event handler functions are defined in handlers.js
			file_queued_handler : fileQueued,
			file_queue_error_handler : fileQueueError,
			file_dialog_complete_handler : fileDialogComplete,
			upload_start_handler : uploadStart,
			upload_progress_handler : uploadProgress,
			upload_error_handler : uploadError,
			upload_success_handler : uploadSuccess,
			upload_complete_handler : uploadComplete,
			queue_complete_handler : queueComplete
		// Queue plugin event
		};

		swfu = new SWFUpload(settings);
	};

	function uploadAll() {
		swfu.startUpload();
	}
</script>
<title>多文件上传</title>
</head>
<body>
	<div>
		<div>
			<a id="uploadAll" href="javascript:void(0)">添加</a> <a href="#">暂停</a>
			<a href="#">查看</a>
		</div>
		<table>
			<tr>
				<td>jpg</td>
				<td><input value="" name="fileId" />
					<div>
						123.jpg<span>1.65M</span>
					</div>
					<div>-----++++++++++++++++</div></td>
				<td><a href="#">上传</a></td>
				<td><a href="#">删除</a></td>
			</tr>
			<tr>
				<td>jpg</td>
				<td><input value="" name="fileId" />
					<div>
						123.jpg<span>1.65M</span>
					</div>
					<div>-----++++++++++++++++</div></td>
				<td><a href="#">上传</a></td>
				<td><a href="#">删除</a></td>
			</tr>
		</table>
		<div>
			<span>已上传文件0/4</span> <span>上传速度 12.3k/s</span>
		</div>
		<button onclick="uploadAll()">上传</button>
	</div>
</body>
</html>